﻿@model IEnumerable<Stertex.Repository.Profile>

@{
    ViewBag.Title = "List";
    var grid = new WebGrid(@Model, canPage: true);

}

<h2>List</h2>

<p>

    @Html.ActionLink("Create New", "Registration")
</p>
@*<table runat="server" visible="false">
    <tr>
        <th>
            Firstname
        </th>
        <th>
            Lastname
        </th>
        <th>
            Phone
        </th>
        <th>
            Company
        </th>
        <th>
            Title
        </th>
        <th>
            Address
        </th>
        <th>
            City
        </th>
        <th>
            State
        </th>
        <th>
            Zip
        </th>
        <th>
            Email
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Firstname)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Lastname)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Phone)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Company)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Title)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Address)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.City)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.State)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Zip)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Email)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.ProfileID }) |
            @Html.ActionLink("Details", "Details", new { id=item.ProfileID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.ProfileID })
        </td>
    </tr>
}

</table>*@

   @grid.GetHtml()
